export function goBack(){
    var sys = 'android';
    var isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
    //获取url参数
    var GetRequest = function(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
                var pair = vars[i].split("=");
                if(pair[0] == variable){return pair[1];}
        }
        return(false);
    }
    //打开app
    var openApp = function(){
        var _inviteCode = GetRequest("inviteCode")
        if(isiOS){
            // location.href = "CCC://com.BBB.AAA?" + _inviteCode
            window.location.href="hbuilder://"
        }else{
            // alert("唤起")
            var appOpenUrl = "hbuilder://" + _inviteCode
            //在iframe 中打开APP
            var ifr = document.createElement('iframe');
            ifr.src = appOpenUrl;
            ifr.style.display = 'none';
    
            document.body.appendChild(ifr);      
            setTimeout(function() {
                document.body.removeChild(ifr);
            }, 2000); 
        }
        
    };
			    
			    //是否是微信判断
			   
	 openApp()
}